﻿#region
/* ===============================================
 * 作者：guopeng           时间：2012/5/12 16:03:59
 * 
 * 
 * 类描述：
 * 
 * 
 * =============================================== */
#endregion

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ueEngine.Biz.Inf.Entities.DBSupport;
using System.ComponentModel.DataAnnotations;
using ueEngine.Framework.Exception;

namespace ueEngine.Biz.Inf.Entities
{
    [Table("RecruiterCollect")]
    public class RecruiterCollect : BaseEntity<RecruiterCollect>
    {
        public RecruiterCollect() { }
        public override RecruiterCollect Get(System.Linq.Expressions.Expression<Func<RecruiterCollect, bool>> where)
        {
            using (Context ctx = new Context())
            {
                var item = ctx.RecruiterCollect.FirstOrDefault(where);
                if (item != null)
                {
                    this.Id = item.Id;
                    this.AddDate = item.AddDate;
                    this.Agent = item.Agent;
                    this.Seeker = item.Seeker;
                    return this;
                }
                return null;
            }
        }

        #region self
        [Column(TypeName="int")]
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }
        /// <summary>
        /// 求职者
        /// </summary>
        [Column(TypeName="varchar")]
        [StringLength(200)]
        public string Seeker { get; set; }

        /// <summary>
        /// 代理人
        /// </summary>
        [Column(TypeName = "varchar")]
        [StringLength(200)]
        public string Agent { get; set; }

        /// <summary>
        /// 添加时间
        /// </summary>
        [Column(TypeName = "datetime")]
        public DateTime AddDate { get; set; }
        #endregion
    }
}
